using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace WPCoco
{
    public partial class Coco
    {
        static PresentInterval presentInterval = PresentInterval.One;

        public static void Setup60FPS(Game game, GraphicsDeviceManager manager) 
        {
            manager.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(manager_PreparingDeviceSettings);
            presentInterval = PresentInterval.One;
            game.TargetElapsedTime = new TimeSpan(166666);
            manager.PreparingDeviceSettings -= new EventHandler<PreparingDeviceSettingsEventArgs>(manager_PreparingDeviceSettings); 
        }

        public static void Setup30FPS(Game game, GraphicsDeviceManager manager)
        {
            manager.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(manager_PreparingDeviceSettings);
            presentInterval = PresentInterval.Default;
            game.TargetElapsedTime = new TimeSpan(333333);
            manager.PreparingDeviceSettings -= new EventHandler<PreparingDeviceSettingsEventArgs>(manager_PreparingDeviceSettings); 
        }

        static void manager_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
        {
            e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval = presentInterval;
        }



        public static void SetFullScreen()
        {

        }

        public static void SetWindowedScreen() 
        {

        }
    }
}
